Skip to content

feat(text): publish the technique shader library as @pmndrs/text/tsl - #60

Closed
thejustinwalsh wants to merge 2 commits into
refactor/core-subpathfrom
refactor/tsl-subpath
Closed

feat(text): publish the technique shader library as @pmndrs/text/tsl#60
thejustinwalsh wants to merge 2 commits into
refactor/core-subpathfrom
refactor/tsl-subpath

Conversation

@thejustinwalsh

@thejustinwalsh thejustinwalsh commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Publish the technique shader library (D-249)

The Bitmap, MSDF, Slug, and decoration TSL node graphs — including the Slug shader tree that lived in core internal/slug-shaders/ — move to src/tsl/ and publish as @pmndrs/text/tsl under Tsl-prefixed types. A renderer integration that consumes TSL node graphs reuses one canonical shading implementation per technique instead of reimplementing coverage math; the Three entry stops re-exporting shader symbols and Three's materials import the library like any other consumer.

Behavior unchanged; a subpath types test pins the surface and the focused Slug TSL type-regression project moves with the tree.

Stack created with GitHub Stacks CLIGive Feedback 💬

@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown

size-limit report 📦

Path Size
Core JS (gzip) 18.38 KB (0%)
Shaper Wasm (gzip) 418.77 KB (0%)
Three.js adapter JS (gzip) 57.55 KB (-0.57% 🔽)
Inter font · Bitmap (gzip) 545.27 KB (0%)
Inter font · MTSDF (gzip) 6.48 MB (0%)
Inter font · Slug (gzip) 604.06 KB (0%)
Font Awesome icons · Bitmap (gzip) 439.53 KB (0%)
Font Awesome icons · MTSDF (gzip) 6.89 MB (0%)
Font Awesome icons · Slug (gzip) 642.64 KB (0%)
Font validator JS (gzip) 134.24 KB (0%)
Runtime bake host JS (gzip) 5.38 KB (0%)
Runtime bake Worker JS (gzip) 142.45 KB (0%)
Font baker JS (gzip) 2.41 KB (0%)
Font baker Wasm (gzip) 379.63 KB (0%)
Bitmap baker JS (gzip) 4.66 KB (0%)
Bitmap baker Wasm (gzip) 228.31 KB (0%)
MTSDF baker JS (gzip) 5.39 KB (0%)
MTSDF baker Wasm (gzip) 209.22 KB (0%)
Slug baker JS (gzip) 4.01 KB (0%)
Slug baker Wasm (gzip) 181.24 KB (0%)

@thejustinwalsh
thejustinwalsh marked this pull request as ready for review August 12, 2026 00:30
The Bitmap, MSDF, Slug, and decoration TSL node graphs — including the
Slug shader tree that lived in core internals — move to src/tsl/ and
publish on one subpath with Tsl-prefixed types, so a future TypeGPU or
third-party integration consumes the same canonical shading
implementation per technique. The Three entry stops re-exporting
shader symbols; Three's materials import the library like any other
consumer. A types test pins the subpath surface.
# Conflicts:
#	docs/packages/glyph.md
#	docs/planning/typegpu-first-shader-authority.md
#	packages/glyph/src/internal/slug-shaders/calc-coverage.ts
#	packages/glyph/src/internal/slug-shaders/calc-root-code.ts
#	packages/glyph/src/internal/slug-shaders/index.ts
#	packages/glyph/src/internal/slug-shaders/reference.ts
#	packages/glyph/src/internal/slug-shaders/slug-band.ts
#	packages/glyph/src/internal/slug-shaders/slug-dilate.ts
#	packages/glyph/src/internal/slug-shaders/slug-render.ts
#	packages/glyph/src/internal/slug-shaders/slug-texture.ts
#	packages/glyph/src/internal/slug-shaders/solve-quadratic.ts
#	packages/glyph/src/internal/slug-shaders/tsl-compat.ts
#	packages/glyph/src/three/bitmap-shader.ts
#	packages/glyph/src/three/decoration-shader.ts
#	packages/glyph/src/three/msdf-shader.ts
#	packages/glyph/src/three/slug-shader.ts
#	packages/glyph/src/tsl.ts
#	packages/glyph/src/tsl/bitmap-shader.ts
#	packages/glyph/src/tsl/decoration-shader.ts
#	packages/glyph/src/tsl/msdf-shader.ts
#	packages/glyph/src/tsl/slug-shader.ts
#	packages/glyph/src/tsl/slug-shaders/calc-coverage.ts
#	packages/glyph/src/tsl/slug-shaders/calc-root-code.ts
#	packages/glyph/src/tsl/slug-shaders/index.ts
#	packages/glyph/src/tsl/slug-shaders/reference.ts
#	packages/glyph/src/tsl/slug-shaders/slug-band.ts
#	packages/glyph/src/tsl/slug-shaders/slug-dilate.ts
#	packages/glyph/src/tsl/slug-shaders/slug-render.ts
#	packages/glyph/src/tsl/slug-shaders/slug-texture.ts
#	packages/glyph/src/tsl/slug-shaders/solve-quadratic.ts
#	packages/glyph/src/tsl/slug-shaders/tsl-compat.ts
#	packages/glyph/tests/integration/three-shader.test.mjs
#	packages/glyph/tests/types/tsl-api.test.ts
#	packages/text/src/internal/slug-shaders/calc-coverage.ts
#	packages/text/src/internal/slug-shaders/calc-root-code.ts
#	packages/text/src/internal/slug-shaders/index.ts
#	packages/text/src/internal/slug-shaders/reference.ts
#	packages/text/src/internal/slug-shaders/slug-band.ts
#	packages/text/src/internal/slug-shaders/slug-dilate.ts
#	packages/text/src/internal/slug-shaders/slug-render.ts
#	packages/text/src/internal/slug-shaders/slug-texture.ts
#	packages/text/src/internal/slug-shaders/solve-quadratic.ts
#	packages/text/src/internal/slug-shaders/tsl-compat.ts
#	packages/text/src/three/bitmap-shader.ts
#	packages/text/src/three/decoration-shader.ts
#	packages/text/src/three/msdf-shader.ts
#	packages/text/src/three/slug-shader.ts
@thejustinwalsh

Copy link
Copy Markdown
Collaborator Author

Merged to main by the atomic stack merge on 2026-08-19, but GitHub did not record the merge: this PR stayed OPEN with mergedAt: null, its base was never retargeted, and its branch was never deleted.

The work is on main as 711b8b8.

Squash merging rewrote the commits, so the head SHA never became an ancestor of main and GitHub cannot detect the merge retroactively. Rebasing onto main does not no-op either — it conflicts across 11 files trying to replay commits that predate the text -> glyph rename against a tree that already contains them in squashed form.

Closing rather than rebasing, so the already-merged work is not reintroduced and re-resolved. Closed, not merged, is a GitHub bookkeeping artifact here, not a statement about the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant